import axios from '@/libs/request'

/**
 * 新增数据
 * @returns {*}
 */
export const create = (dbName, data) => {
  return axios.request({
    url: '/api/ac/setting/sst' + dbName + 'Service/insertSst' + dbName,
    type: 'post',
    data: data
  })
}
/**
 * 修改数据
 * @param data
 * @returns {*}
 */
export const update = (dbName, data) => {
  return axios.request({
    url: '/api/ac/setting/sst' + dbName + 'Service/updateSst' + dbName,
    data: data,
    type: 'post'
  })
}
/**
 * 查询数据
 * @param data
 * @returns {*}
 */
export const select = (dbName, data) => {
  return axios.request({
    url: '/api/ac/setting/sst' + dbName + 'Service/selectSst' + dbName + 'ByFlowList',
    data: data,
    type: 'post'
  })
}
/**
 * 问题管控查询数据
 * @param data
 * @returns {*}
 */
export const selectSstGovProblemByBaseList = (data) => {
  return axios.request({
    url: 'api/ac/setting/sstGovProblemService/selectSstGovProblemByBaseList',
    data: data,
    type: 'post'
  })
}
/**
 * 查询数据
 * @param data
 * @returns {*}
 */
export const selectByNode = (dbName, data) => {
  return axios.request({
    url: '/api/ac/setting/sst' + dbName + 'Service/selectSst' + dbName + 'ByNode',
    data: data,
    type: 'post'
  })
}
